#!/bin/bash
baseDirForScriptSelf=$(cd "$(dirname "$0")"; pwd)
# 初始化环境变量
source ${baseDirForScriptSelf}/source.sh
# 安装python
echo 'Install python3'
bash ${baseDirForScriptSelf}/install_python.sh
if [ $? -gt 0 ];then
    exit 1
fi
echo 'Installing the dependency using the pip, about 2 to 5 minutes.'
python3.8 -m pip install scons >>${baseDirForScriptSelf}/init_run.log 2>&1
python3.8 -m pip install setuptools >>${baseDirForScriptSelf}/init_run.log 2>&1
python3.8 -m pip install kconfiglib >>${baseDirForScriptSelf}/init_run.log 2>&1
python3.8 -m pip install pycryptodome >>${baseDirForScriptSelf}/init_run.log 2>&1
python3.8 -m pip install testresources
python3.8 -m pip install six --upgrade --ignore-installed six >>${baseDirForScriptSelf}/init_run.log 2>&1
python3.8 -m pip install ecdsa >>${baseDirForScriptSelf}/init_run.log 2>&1
python3.8 -m pip install prompt_toolkit==1.0.15 >>${baseDirForScriptSelf}/init_run.log 2>&1